Skip to content

Sanitize markdown before parsing#32

Merged
hackall360 merged 1 commit intomainfrom
codex/pre-sanitize-content-before-marked.parse
Sep 13, 2025
Merged

Sanitize markdown before parsing#32
hackall360 merged 1 commit intomainfrom
codex/pre-sanitize-content-before-marked.parse

Conversation

@hackall360
Copy link
Contributor

Summary

  • strip residual fenced blocks like image, audio, or ui before passing messages to marked
  • add reusable markdown sanitizer and unit test to verify code blocks and <hr> still render
  • wire sanitizer into chat message rendering and load via new module

Testing

  • npm test (fails: textModels returns JSON — fetch failed, text(prompt) returns string — fetch failed, chat basic response — fetch failed, search convenience returns text — fetch failed, imageModels returns JSON — fetch failed, image fetch small blob — fetch failed, mcp generateImageBase64 returns base64 — fetch failed, vision with data URL — fetch failed, audio.tts returns audio blob — fetch failed, mcp list helpers return arrays/objects — fetch failed, pipeline end-to-end — fetch failed)
  • node tests/markdown-sanitization.mjs

https://chatgpt.com/codex/tasks/task_b_68c5f4bcbf90832facf08d8e9f9a741d

@hackall360 hackall360 merged commit 7d4b61a into main Sep 13, 2025
1 check failed
@hackall360 hackall360 deleted the codex/pre-sanitize-content-before-marked.parse branch September 13, 2025 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant